API parameters

Parameter Description
FTPURL The ftp location (including username and password) where your Optimizely responses are generated.

The following data is inserted into the FastStats Email Response Table as part of the predefined configuration. You can optionally override the settings by adding them in the FastStats Email Response Configurator.

Email Response Gatherer Parameters

  Response Table field Optimizely extract file column
PEMPRIVATEKEY   If secure ftp is used above and requires a private key, this should refer to the path and filename of that key
FILEPATTERN Response* Allows you to filter your responses to specific types when reading files from the ftp site
EMAILCOLUMNNAME Email Email address
URNCOLUMNNAME Urn FastStats Urn. Only be available if it has been previously uploaded from FastStats
COMMUNICATIONKEYCOLUMNNAME CommunicationKey FastStats Communication Key. Only be available if it has been previously uploaded from FastStats
RUNCOLUMNNAME   Reserved for future use
TYPECOLUMNNAME MessageType Response type
MESSAGENAMECOLUMNNAME   The message name is not returned in the Optimizely extract file, but a reference is, this should typically be left as the default value
DELIVERYDATECOLUMNNAME DeliveryDate Delivery date
CLICKURLCOLUMNNAME ClickUrl The name of the URL that was clicked
CLICKDATECOLUMNNAME ClickDate Date the link was clicked
EVENTTRIGGEREDDATECOLUMNNAME EventTriggeredDate Date the response occurred
TYPE   This allows you to restrict the data downloaded to a specific type of response: OpenBounceClick
DATEFORMAT   Date format used e.g. dd.MM.yyyy HH:mm
DATEOFFSET 0 Value in hours to offset any date values received. This allows you to write responses in your current time zone
MAXRETRIES 1000 The number of times the Email Response Gatherer will check to see if the extract file exists on the ftp site
READACCESSRETRIES 300 The number of times the Email Response Gatherer will check to see if the extract file is readable on the ftp site
DELIMITER Tab Type of delimiter used in the extract file, options include: COMMA (,)DOUBLEQUOTE (")NULL.SEMI (;)SPACE ( )SINGLEQUOTE (')TAB
ENCLOSER None Type of enclose used in the extract file
TreatTypeAsAdditionalField false Setting this to true will force the raw response type to be written to the ResponseDetails table before any conversion is carried out
TreatMessageNameAsAdditionalField false Setting this to true will force the raw message name to be written to the ResponseDetails table before any conversion is carried out
LookupBroadcastIdsOnTheFly false False will force the Email Response Gatherer to download a full list of Broadcast Ids from all the previous broadcasts in the response database. This can then be used to quickly match responses to broadcasts. If set to true, the Broadcast Ids will be fetched and cached as and when required
OnlyProcessRecordsWithBroadcastId false Setting this to true will force the Email Response Gatherer to only download responses to messages that have originated from FastStats. The default option is false; all responses will be downloaded.

Note: These settings are specific to each Optimizely account.

Email Broadcasting Parameters

Parameter Default Description
(*Example, or these will be specific to your account)
Client ID   Your Optimizely Client ID
Urn Field Name Urn  
Email Field Name Email  
UseDatedList false Setting this to false will remove the date and time stamp at the end of the file name
Template List Name   *ClosedLoopWebServiceTemplate: master
Upload Only Folder %LISTNAME% *You can define this using absolute folder and pathnames or use the parameters shown
Upload and Broadcast Folder %LISTNAME%\%MESSAGENAME% * You can define this using absolute folder and pathnames or use the parameters shown
Use Closed Loop true Setting to use with Smart Campaign
Closed Loop Layout   *Person
URN|Email|Salutation|Title|Firstname|Lastname|fon|Message|Discount|Communication Key
UploadEmptyLists true Set this to false if you wish to prevent empty list being uploaded to Optimizely
DatedListFormat yyyMMdd-HHmmss The date format string for the date and time stamp if created
MaxImportWaitTime 7200 (120 minutes) The maximum time to wait for a list to be imported in seconds
Encoding UTF8 Enter the encoding of the incoming file
EscapeQuotes False Set this to true to escape quote characters
MailingListRetentionPeriod 0 The number of days to keep the uploaded mailing list
File Mapping   A pipe delimited list of header values that will overwrite any defined in your outout sequences
Closed Loop Url   Close Loop Url
Mailing Url   Mailing Url
Recipient List Url   The Recipient List Url
Recipient Url   Recipient Url
Session Url   Session Url

Example Batch File

Example batch file to use with FERG and scheduling

@echo off

REM****************************************************************************

REM File Name: OptimizelyBatchFile.bat

REM Date: 30/01/2018

REM To Do:

REM Define the drive and folders to output the log files

REM Set FERG to define the location of the EmailResponseGatherer64.exe

REM Set LOGFILE to the folder where the event logs are stored

REM Set LOGFILEDETAILS to the folder where detail logs are stored

REM Define the XML configuration file to use

REM ***************************************************************************

D:

cd D:\FastStats\FERG

cls

SET FERG="%ProgramFiles%\Apteco\FastStats Email Response Gatherer x64\EmailResponseGatherer64.exe"

SET LOGFILE="Logs\Optimizely.txt"

SET LOGFILEDETAILS="Logs\Optimizely_Details.txt"

echo. >> %LOGFILE%

echo. >> %LOGFILEDETAILS%

echo %date% %time% - Starting FastStats Optimizely Response Download >> %LOGFILE%

echo %date% %time% - Starting FastStats Optimizely Response Download >> %LOGFILEDETAILS%

echo. >> %LOGFILE%

>> %LOGFILEDETAILS%

echo.

%FERG% Optimizely.xml >> %LOGFILEDETAILS%

IF ERRORLEVEL 9003 goto FailedException

IF ERRORLEVEL 9002 goto FailedLogout

IF ERRORLEVEL 9001 goto FailedDownload

IF ERRORLEVEL 9000 goto FailedLogin

 

:OK

echo %date% %time% - FastStats Gathered Optimizely Responses OK >> %LOGFILE%

goto Complete

 

:FailedLogin

echo %date% %time% - FastStats Gatherer Failed - Login Failed to Optimizely >> %LOGFILE%

goto Complete

 

:FailedDownload

echo %date% %time% - FastStats Gatherer Failed - Downloading from Optimizely >> %LOGFILE%

goto Complete

 

:FailedLogout

echo %date% %time% - FastStats Gatherer Failed - Logging out of Optimizely >> %LOGFILE%

goto Complete

 

:FailedException

echo %date% %time% - FastStats Gatherer Failed - Optimizely API Exception >> %LOGFILE%

goto Complete

 

:Complete

echo %date% %time% - Completed FastStats Optimizely Response Download >> %LOGFILE%

End of example text

 

To see how to use the batch file see section Scheduling the Response Gatherer.

Troubleshooting

The following are some common problems that may occur, and procedures for resolving them.

Errors relating to configuring and using FERG

These errors can occur due to missing files.

Description: Error received when running FERG using a batch file

Error: Could not read email response configuration file: Could not find file 'D:\FastStats\FERG\Optimizely.xml'.

Optimizely.xml refers to the filename referenced in this section of the batch file:

 

%FERG% Optimizely.xml >> %LOGFILEDETAILS%

In the location:

“cd D:\FastStats\FERG” in the batch file

 

Solution: Ensure the file exists or change the filename in the batch file to match.